﻿using Autoupdate.Common;
using System;
using System.Windows.Forms;

namespace GDF.AutoupdateConfig
{
    static class Program
    {
        /// <summary>
        /// 应用程序的主入口点。
        /// </summary>
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            Log.FileName = Application.StartupPath + "\\Data\\Log.txt";
            string dbFileName = Application.StartupPath + "\\Data\\DBSetting.xml";
            ConnectServerForm connectForm = new ConnectServerForm(dbFileName);
            if (!connectForm.TryConnect())
            {
                if (connectForm.ShowDialog() != DialogResult.OK)
                    return;
            }

            Application.Run(new MainForm());
        }
    }
}
